Skip to content

ci: run the macOS Tier 2 tests inside the Tier 3 macOS job - #688

Closed
chrisknvidia wants to merge 4 commits into
mainfrom
ci/christopherk/fold-tier2-macos
Closed

chrisknvidia wants to merge 4 commits into
mainfrom
ci/christopherk/fold-tier2-macos

Conversation

@chrisknvidia

@chrisknvidia chrisknvidia commented Nov 16, 2026 •

Copy link
Copy Markdown
Collaborator

Do not merge before the branch ruleset is edited. This PR removes the Tier 2 (macos-latest) job, which is a required check in "Protect main". Until that name is taken out of the ruleset, this PR cannot merge, because the check it waits for no longer exists here. Removing this required context is a global ruleset change: it also stops requiring the separate Tier 2 macOS result on older PR branches whose Tier 3 job does not yet include those tests. A maintainer must coordinate enforcement during that transition.

Summary

Every pull request starts two macOS runners that do the same setup: check out, Python 3.12, uv sync --all-extras --locked. One then runs the Tier 3 contract and progress tests (about 2 minutes), the other the Tier 2 tests (about 5.5 minutes).

This PR runs both test sets in the existing Tier 3 macOS contract and progress job, as two named steps, and removes the Tier 2 (macos-latest) job.

What changes on a pull request:

  • One macOS line and one macOS runner instead of two.
  • The merged job takes about 8 minutes (2.5 + 5.5, less one setup). That is still under Tier 2 (windows-latest), which takes 10 to 13 minutes and sets how long a PR waits.

What does not change:

  • The same six Tier 2 paths run on macOS: tests/embedding, tests/deduplication, tests/validators/test_similarity.py, tests/reporting, tests/test_cli.py, tests/test_oss_packaging.py.
  • The Tier 2 step runs even when the Tier 3 step fails (if: ${{ !cancelled() }}), so one failure does not hide the other.
  • The surviving job keeps its id and its name, so Tier 3 macOS contract and progress stays a valid required check for every open pull request, old or new. No flag day.

Why

In three weeks of CI history (1,962 runs up to 13 Nov), Tier 2 (macos-latest) caught nothing that was specific to macOS. The tests are still worth running there, and they still do. A second runner for them is what this removes.

Please look at

  • The job name. Tier 3 macOS contract and progress now also runs Tier 2 tests, so the name undersells it. I kept it on purpose: renaming a required check blocks every open PR until it picks up the new name. If you want a rename, it is better as its own change with the ruleset edited at the same time.
  • Whether you want this at all. It is a tidy-up, not a fix.

Ruleset change needed (maintainer)

The intended final "Protect main" ruleset removes Tier 2 (macos-latest) from the required status checks and retains Tier 3 macOS contract and progress. Before making that global change, a maintainer must choose a transition that preserves macOS Tier 2 enforcement for older PR branches, such as refreshing their workflows or retaining a compatible required status during rollout.

Verification

  • I am familiar with the Contributing Guidelines

  • Added or updated focused tests

  • Updated documentation for user-visible changes (none: CI only)

  • Ran make lint (ruff check on the changed test file)

  • Ran make test

  • Ran make build

  • Did not add credentials, private datasets, or proprietary benchmark content

  • tests/test_ci_workflows.py passes: 44 passed. It no longer lists tier2-macos as a required job, and it checks that the Tier 3 macOS job has both test steps, that the second runs the Tier 2 paths, and that it runs when the first fails.

  • With the run-anyway condition removed, or with the Tier 2 step removed, the updated test fails.

  • The Tier 2 path list in the merged job is identical to the removed job's. The regression now guards all six paths as exact shell arguments. Twenty mutation controls reject each single-path deletion, each path-prefix substitution, each comment-only replacement, a missing step and the missing run-anyway condition; quoted valid arguments still pass.

Hosted validation of the unchanged workflow at f1f9be7f: combined macOS job 133559791048 succeeded in 7m37s. The named Tier 3 step completed 1,188 passed, 6 skipped and 2 deselected; the Tier 2 step completed 3,794 passed and 88 skipped. The subsequent commit strengthens only the workflow-contract test; that new head's CI remains a separate gate. Local focused verification passed all 44 workflow tests, make lint and make build. The full local suite was not rerun for this test-only guard change, and a forced hosted failure/cancellation was not attempted.

Release Impact

  • No user-visible release note needed
  • Updated CHANGELOG.md

CI only.

Every pull request started two macOS runners with the same setup, one
for the Tier 3 contract and progress tests and one for the Tier 2 tests.
The Tier 2 tests now run as a second step of the Tier 3 macOS job, which
keeps its id and name. The step runs even when the Tier 3 step fails,
and the same six test paths run as before.

This removes the 'Tier 2 (macos-latest)' job, which is a required check
in the branch ruleset. The ruleset must drop that name before this can
merge.

Signed-off-by: Christopher Kevin <christopherk@nvidia.com>
Signed-off-by: Christopher Kevin <christopherk@nvidia.com>

@rng1995 rng1995 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Independent review of 458bf9f1: no actionable issues found in the changed code. Focused validation and its scope are recorded inline.

Comment thread .github/workflows/ci.yml Resolved

@rng1995 rng1995 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed at 6ed419f3 (the main merge leaves this PR's diff unchanged from 458bf9f1). No issues found.

Checked: the six Tier 2 paths in the new step match the removed tier2-macos job exactly, with the same runner, Python, uv pin and uv sync --all-extras --locked. The job keeps its id, name, needs and if. No other workflow or doc refers to tier2-macos. The live "Protect main" ruleset still lists Tier 2 (macos-latest) as required, so the merge note in the description applies. Workflow tests pass locally (44 passed).

Signed-off-by: Christopher Kevin <christopherk@nvidia.com>
@chrisknvidia

Copy link
Copy Markdown
Collaborator Author

Replaced by #704, which takes the Tier 2 tests off macOS for pull requests instead of folding them into another job. The budget test fix that was pushed onto this branch is now #707.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants